import React from 'react'
import PropTypes from 'prop-types'
import CommonHeader from '../component/common_header/index'
import PostTopic from '../component/post_topic/index'

const PostDetailPage = props => (
  <div>
    <CommonHeader title={props.match.action === 'edit' ? '编辑话题' : '发表新话题'} />
    <PostTopic action={props.match.action} />
  </div>
)
export default PostDetailPage

PostDetailPage.propTypes = {
  match: PropTypes.objectOf(Object),
}
